Learn R Programming

scater (version 1.0.4)

set_exprs<-: Assignment method for the new elements of an SCESet object.

Description

The assayData slot of an SCESet object holds the expression data matrices. This functions makes it convenient to add new transformations of the expression data to the assayData slot.

Usage

set_exprs(object, name) <- value
"set_exprs"(object,name)<-value

Arguments

object
a SCESet object.
name
character string giving the name of the slot to which the data matrix is to be assigned (can already exist or not).
value
a numeric or integer matrix matching the dimensions of the other elements of the assayData slot of the SCESet object.

Value

NULL, but adds expression data to the SCESet object

Examples

Run this code
data("sc_example_counts")
data("sc_example_cell_info")
example_sceset <- newSCESet(countData = sc_example_counts)
set_exprs(example_sceset, "scaled_counts") <- t(t(counts(example_sceset)) /
colSums(counts(example_sceset)))
get_exprs(example_sceset, "scaled_counts")[1:6, 1:6]

Run the code above in your browser using DataLab